Worksheet 5, Math 151

IMPLICIT DIFFERENTIATION

Introduction

Goals : Learn to find the slope and tangent line to a plane curve at any point where its graph is smooth via the implicit differentiation.

Recall that a continuous function, y=f(x), defined on an open interval I is implicit in the equation                                                                                                                                                                       
                                                  (*)     F(x,y)=C,
provided that F(x,f(x))=C holds for all  x in I.

It is possible to find the derivative at a point on the graph of  (*)  without first solving the equation for y, by using a technique called  implicit differentiation. We return to  (*) and differentiate both sides of this equation with respect to x, viewing  y as a differentiable function of x, (applying the chain rule whenever differentiating a term involving y), and ultimately solve for ((dy)/(dx)). This procedure can be carried out by invoking the appropriate Mathematica commands.

Examples

Find the slope, m, of the tangent line to the graph of the cardioid with equation: (x^4)+(y^4)-4((y^3)+(x^2)+(x^2)y)+2(x^2)(y^2)=0 at the point P=(((2+(Sqrt[3]))/2),((2(Sqrt[3])+3)/2)).
First, we enter the expression defining the left-hand side of the cardioid equation and the point P.

cardioid=(x^4)+(y^4)-4((y^3)+(x^2)+(x^2)y)+2(x^2)(y^2)
p={(2+Sqrt[3])/2,(2Sqrt[3]+3)/2}

Next, we sketch a graph of the cardoid in the x y-coordinate plane using the Mathematica command ContourPlot. We also plot the position of the point P using the graphics primitive Point. These two graphs are created separately and then combined with the Show command.

cardioidplot=ContourPlot[cardioid==0,{x,-3,3},{y,-1,4},ContourStyle -> {Red, Thick},Axes -> True, Frame -> False];
pointplot=Graphics[{Text[Style["P",Green,14],p+{0.2,0.2}],{PointSize[Large],Green,Point[p]}}];
Show[cardioidplot,pointplot]

In order to be able to perform implicit differentiation we now tell Mathematica that y is actually a function of x using the substitution rule /.y->y[x]. We therefore redefine cardioid:

cardioid=cardioid/.y->y[x]

To differentiate the implicit equation of the cardioid with respect to x, we can use the D command.

cardioidImplicDiff=D[cardioid==0,x]

It is not difficult (for Mathematica) to solve this equation for y'[x]:

soln=Solve[cardioidImplicDiff,y'[x]]

Since the solution is presented to us as a set of (one single) rule we can extract only the relevant part via

yprime=y'[x]/.soln[[1]]

At the point P with x-component p[[1]] and y-component p[[2]] the slope is (using another set of substitution rules)

m=yprime/.{x->p[[1]],y[x]->p[[2]]}

This is a bit ugly, so let's try

m=Simplify[%]

Now, using the point-slope formula for the tangent line we can plot

tangentplot=Plot[m*(x-p[[1]])+p[[2]],{x,-3,3},PlotRange->{-1,4},PlotStyle->{Blue,Thick}]

Finally, everything together:

Show[tangentplot,cardioidplot,pointplot]

Exercises

Exercise 1

The curve with the equation: ((((x^2)+(y^2)))^2)=4(x^2)y is called a bifolium. Its graph is shown below.

(a) Use Mathematica with the same procedure as above to find (dy/dx).

Note that at extremum points P and Q in the figure, the tangent lines to the bifolium are vertical, i.e. |(dy/dx)|=(+∞) at P and Q.
To find the exact coordinates of these extreme points, we may do the following:

(b) Observe that (dy/dx) is a quotient of polynomials in x and y.
Now set the polynomial in the denominator equal to zero and then use the Solve command to solve the resulting equation for (x^2) in terms of y.

(c) Substitute your result from part (b) for (x^2) back into the original equation of the bifolium to obtain an equation in y alone. Then solve this equation for y. This value is the common y coordinate of the points P  and Q. For this part, you may use sustitution rules (/.) and the Solve command.

(d) Now to find the x-coordinates of P and Q, we may substitute their common y coordinate back into the equation of the bifolium and solve that resulting equation for x.

(e) To verify the accuracy of your calculations, plot the equation of the bifolium with Mathematica and indicate the location of the points P and Q with dots as illustrated in the introduction to this exercise. Hint: You can improve the quality of your plot by using PlotPoints -> 200 inside the Plot command.

Exercise 2

Given the equation (**) x cos(πy)=(((x+y))^2).

(a) Plot a graph of the equation (**) for -8≤x≤8, -5≤y≤6.

(b) Verify (by hand) that the point P=(((23+(Sqrt[129]))/12),-(5/3)) is on the graph of the equation.

(c) Use Mathematica to solve for (dy/dx), check this result by working the problem by hand.

(d) Find the slope of the tangent line to the graph of the equation at point P using Mathematica. Express this quantity as an irrational number and then find its decimal representation to ten significant digits (using Mathematica's N[] command). Use Mathematica to plot a graph which shows this tangent line and be sure to include the point P in your graph.

(e) Solve the equation for x in terms of y and note the quantity under the radical sign. Use this representation to explain why equation (**) has no solution (for x) whenever (3/2)<y<(5/2).